﻿/*------------------------------------------------------------------
-- COPYRIGHT (C) 2010-2012  Atom
-- ALL RIGHTS RESERVED.
-- 兆尹科技
-- CREATE DATE: 2010/07/12
-- CREATE MAN:liujian	
-- 连接字符串加密解密类
-- MODIFY HISTORY:
-- MODIFY DATE:
-- MODIFY MAN:	
-- MODIFY DESC:
-- MODIFY DATE:
-- MODIFY MAN:	
-- MODIFY DESC:
---------------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using Atom.Utility;

namespace Atom.Common
{
    /// <summary>
    /// 连接字符串加密解密
    /// </summary>
    public class ConnectionStringCryptography
    {
        private static string KEY = "$$##@@!!";

        /// <summary>
        /// 加密字符串
        /// </summary>
        /// <param name="input">明文</param>
        /// <returns>密文</returns>
        public static string Encrypt(string input)
        {
            return CryptographyUti.Encrypt(input, KEY);
        }

        /// <summary>
        /// 解密字符串
        /// </summary>
        /// <param name="input">密文</param>
        /// <returns>明文</returns>
        public static string Decrypt(string input)
        {
            return CryptographyUti.Decrypt(input, KEY);
        }      
    }
}
